import React, { Component } from 'react';
import {NavLink} from 'react-router-dom';

class My extends Component {
    render() {
        let name = localStorage.getItem('name') || '';
        return (
            <div>
                <div className="status">
                    {name ? <div>登录状态</div> :<div>
                        <NavLink to="/login">登录</NavLink>
                        <NavLink to="/registry">注册</NavLink>
                    </div>}
                </div>

                <div className="my-con">
                    <NavLink to="/votelist/join">我参与的投票</NavLink><br/>
                    <NavLink to="/votelist/create">我创建的投票</NavLink><br/>

                    <NavLink to="/create">创建</NavLink>
                </div>
            </div>
        );
    }

    componentDidMount(){
        
    }
}

export default My; 